package util;



import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
 * Copy properties betwean javabeans
 * @author ��Ի��
 * @version1.0
 * date 07/8/13
 * Function 
 * History
 */


public class BeanUtil {
	private static final Log log=LogFactory.getLog(BeanUtil.class);
	/**
	 * Copy properties betwean javabeans 
	 * which have the same property name
	 * @param target
	 * @param source
	 */
	public static void BeanToBean(Object target,Object source)
	{
		try
		{
			BeanUtils.copyProperties(target, source);
		}
		catch(Exception e)
		{
			log.debug("BeanUtil copy bean to bean failed"+e);
		}
		
		
	}

}
